<script type="text/javascript">
  $(document).ready(function() {

    $('#request-form').validate({

      rules: {
        request_email: {
          required: true,
          email: true,
          remote: {
            url: "<?php echo url_for('home/checkDuplicateEmail') ?>",
            type: "post"
          }
        }
      },

			messages: {
				request_email: {
					remote: 'Email address is already existing'
				}
			},

      submitHandler: function() {

        $.ajax({
          url: '<?php echo url_for('home/submitPresentationRequest') ?>',
          data: $('#request-form').serialize(),
          type: 'POST',
          beforeSend: function() {
            $('#request-form-loader').css('visibility','visible');
          },
          success: function(data) {
            $('#request-form-loader').css('visibility','hidden');
            alert(data);
          }
        })

      }
    });

  });
</script>
<div id="presentation">
  <div class="header-popup">PRESENTATION</div>
  <div class="content-popup">
    <div class="clear" style="height:20px;"></div>
    <h2>Request for a copy of Globe Business&rsquo; M2M presentation and share it with your colleagues today!</h2>
    <form id="request-form">
      <div style="margin: 0 auto;width:250px;">
        <div class="clear" style="height:10px;"></div>
        <label>
          Please enter your email:
          <img src="/images/loader.gif" width="20" id="request-form-loader" style="visibility: hidden" />
        </label>
        <div class="clear"></div>
        <input type="text" name="request_email" id="request_email" value="" class="inp" />
        <div class="clear" style="height:5px;"></div>
        <input type="submit" id="submit" value="Submit" class="general-2" />
      </div>
    </form>
    <div class="clear" style="height:10px;"></div>
  </div>
  <div class="footer-popup">
    <a href=""><img src="/images/globe-biz-logo-sm.jpg" alt="" width="87" height="40" border="0" class="left" /></a>
    <img src="/images/logo-dark.jpg" alt="" width="213" height="40" border="0" class="right" />
  </div>
</div>